<?php
class Wow_Armory_Core_Cache_File
    extends Wow_Armory_Core_Cache_Abstract
    implements Wow_Armory_Core_Cache_Interface
{
    
    protected $_config = array();
    
    public function __construct($config = false)
    {
        if (is_array($config)) {
            $this->_initConfig($config);
        }
        
        $this->setName('File');
    }
    
    protected function _initConfig(Array $config)
    {
        $needs = array(
            'dir' => 'is_string',
            'suffix' => 'is_string',
            'automaticSerialize' => 'is_bool'
        );
        
        foreach ($needs as $need => $method) {
            if (!in_array($need, array_keys($config))) {
                throw new Wow_Armory_Exception('', 1020);
            } else {
                if (!$method($config[$need])) {
                    throw new Wow_Armory_Exception('', 1021);
                }
            }
        }
    }
    
    protected function _checkConfig()
    {
        
    }
    
    public function load($name)
    {
        
    }
    
    public function write($name, $time, $data)
    {
        
    }
    
} 